package com.clay.appointment.repository;

import com.clay.appointment.entity.hospital.Department;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * @Author : clay
 * @Description: mongo科室数据访问类
 * @Date: Create in 10:57 2021/8/8
 * @Modified By: clay
 */
@Repository
public interface DepartmentRepository  extends MongoRepository<Department,String> {
    /**
     *
     * @param hospitalCode 医院编号
     * @param departmentCode 科室编号
     * @return 返回查询的数据
     */
    Department getDepartmentByHospitalCodeAndDepartmentCode(String hospitalCode, String departmentCode);

    /**
     *
     * @param departmentCode 科室编号
     * @return 科室信息
     */
    Department getDepartmentByHospitalCode(String departmentCode);
}
